<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let work = prompt('你工作多少年了：')
    //模板字符串 外面用 ``  里面用 ${变量}
    console.log(`我工作${work}年了`);
  </script>
</body>
</html>